CREATE TABLE [dbo].[TCFACT_CAMB]
(
[CO_MONE] [dbo].[TD_VC_003] NOT NULL,
[CO_MONE_BASE] [dbo].[TD_VC_003] NOT NULL,
[FE_CAMB] [dbo].[TD_DT_001] NOT NULL,
[FA_CMPR_OFIC] [dbo].[TD_NU_015_006] NOT NULL CONSTRAINT [DF__TCFACT_CA__FA_CM__7E6CC920] DEFAULT ((0)),
[FA_CMPR_MERC] [dbo].[TD_NU_015_006] NOT NULL CONSTRAINT [DF__TCFACT_CA__FA_CM__7F60ED59] DEFAULT ((0)),
[FA_VNTA_OFIC] [dbo].[TD_NU_015_006] NOT NULL CONSTRAINT [DF__TCFACT_CA__FA_VN__00551192] DEFAULT ((0)),
[FA_VNTA_MERC] [dbo].[TD_NU_015_006] NOT NULL CONSTRAINT [DF__TCFACT_CA__FA_VN__014935CB] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TCFACT_CA__CO_US__023D5A04] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TCFACT_CA__FE_US__03317E3D] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TCFACT_CA__CO_US__0425A276] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TCFACT_CA__FE_US__0519C6AF] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCFACT_CAMB] ADD CONSTRAINT [PK__TCFACT_C__9F633F4152793849] PRIMARY KEY CLUSTERED  ([CO_MONE], [CO_MONE_BASE], [FE_CAMB]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCFACT_CAMB] ADD CONSTRAINT [FK__TCFACT_CAMB__1CA7377D] FOREIGN KEY ([CO_MONE], [CO_MONE_BASE]) REFERENCES [dbo].[TMFACT_CAMB] ([CO_MONE], [CO_MONE_BASE])
GO
GRANT SELECT ON  [dbo].[TCFACT_CAMB] TO [public]
GRANT INSERT ON  [dbo].[TCFACT_CAMB] TO [public]
GRANT DELETE ON  [dbo].[TCFACT_CAMB] TO [public]
GRANT UPDATE ON  [dbo].[TCFACT_CAMB] TO [public]
GO
